<{*平台管理*}>
<style>
	.uploader_mobile input{display: inline-block;width: 40px;position: relative;left:-30px;opacity: 0}
</style>
<div class="row">
	<div id="breadcrumb" class="col-md-12">
		<ol class="breadcrumb">
			<li><a href="#">Dashboard</a></li>
			<li><a href="#">Tables</a></li>
			<li><a href="#">Data Tables</a></li>
		</ol>
	</div>
</div>
<div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">
				<div class="box-name">
					<i class="fa fa-usd"></i>
					<span>平台管理</span>
				</div>
				<div class="box-icons">
					<a class="collapse-link">
						<i class="fa fa-chevron-up"></i>
					</a>
					<a class="expand-link">
						<i class="fa fa-expand"></i>
					</a>
					<a class="close-link">
						<i class="fa fa-times"></i>
					</a>
				</div>
				<div class="no-move"></div>
			</div>
			<div class="box-content no-padding">
				<table class="table table-bordered table-striped table-hover table-heading table-datatable" id="datatable-1">
					<thead>
						<tr>
							<th>平台</th>
							<th>累充金额</th>
							<th>统计详表</th>
							<th>发布对账表</th>
						</tr>
					</thead>
					<tbody>
					<!-- Start: list_row -->
					<{foreach from=$list item=item}>
						<tr>
							<td><{$item['channel']}></td>
							<td><{$item['rechargeMoney']}></td>
							<td><{if $item['export_xls'] }><a target="_blank" href="/data/<{$item['export_xls']}>.xlsx">下载:<{$item['export_xls']}>.xlsx<{/if}></td>
							<td><a href="javascript:void(0)" class="publish"  data="<{$item['channel']}>">发布</a>
								<span><br /><a href="/data/<{$item['publish_xls']}>.xlsx" target='_blank'><{$item['publish_xls']}></a></span></td>
						</tr>

					<{/foreach}>

					<!-- End: list_row -->

					</tbody>
					<tfoot>
						<tr>
							<th>平台</th>
							<th>累充金额</th>
							<th>统计详表</th>
							<th>发布对账表</th>
						</tr>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
// Run Datables plugin and create 3 variants of settings
function AllTables(){
	TestTable1();
	TestTable2();
	TestTable3();
	LoadSelect2Script(MakeSelect2);
}
function MakeSelect2(){
	$('select').select2();
	$('.dataTables_filter').each(function(){
		$(this).find('label input[type=text]').attr('placeholder', 'Search');
	});
}
$(document).ready(function() {
	// Load Datatables and run plugin on tables 
	LoadDataTablesScripts(AllTables);
	// Add Drag-n-Drop feature
	WinMove();
	$('.publish').on('click',function(){
		if(!window.confirm("确定发布后状态不可恢复，确定继续吗？")){
			return false;
		}

		var $obj=$(this);
		var channel=$obj.attr('data');
		$.post('<{U("exportSettledRole")}>',{channel:channel},function(res){
			if(res.status==0){
				$obj.next().html("<br /><a href='/data/"+res.file+"' target='_blank'>"+res.file+"</a>")
			}
		})

	});
});


</script>
